package com.gaswell.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Transient;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;

/**
 * <p>
 * 采气井日数据
 * </p>
 *
 * @author Lei Wang
 * @since 2022-05-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "历史数据", description = "历史数据")
@Accessors(chain = true)
@TableName(value = "ksparadatas")
public class KSParaDatas implements Serializable {

    private String WellName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp TestTime;

    private Float Speed;

    private Float Depth;

    private Float Press;

    private Float OilPress;

    private Float QJCL;

    private Float GDVoltage;

    private Float Voltage;

    private Float QJJYValue;

    private Float OilDepth;

    private Float TaoYeHeight;

    private Float OilYeHeight;

    private Float HuanKongYeLiang;

    private Float BelowYouguanXie_JiYeValue;

    private Float YouguanJiYeValue;

    private Float JingDiLiuYa;

    private Integer JlqStatus;


//    //数据状态
//    @Transient
//    @TableField(exist = false)
//    private String dataStatus;


//    @Override
//    public int compareTo(Qba01M o) {
//        Date d = null;
//        Date d2 = null;
//        SimpleDateFormat format0 = new SimpleDateFormat("yyyy/MM/dd");
//        SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
//        if (o.getRq() != null && this.getRq() != null) {
//            try {
//                if (this.getRq().contains("-"))
//                    d = format1.parse(this.getRq());
//                else
//                    d = format0.parse(this.getRq());
//                if (o.getRq().contains("-"))
//                    d2 = format1.parse(o.getRq());
//                else
//                    d2 = format0.parse(o.getRq());
//            } catch (ParseException e) {
//                e.printStackTrace();
//            }
//            return d.compareTo(d2);
//        }
//        return 1;
//    }


}
